import { html } from "htm/preact";

export default function Button({ children, variant, icon, ...props }) {
  const classNames = () => {
    return ["button", variant, icon ? "icon" : ""].join(" ").trim();
  };

  return html`<button ...${props} class=${classNames()}>${children}</button>`;
}
